package com.ctsi.ssdc.admin.service;


import java.util.List;

import com.ctsi.ssdc.admin.domain.CscpMenus;
import org.springframework.data.domain.Pageable;

import com.ctsi.ssdc.admin.domain.dto.CscpMenusCriteria;
import com.ctsi.ssdc.admin.domain.dto.CscpMenusDTO;
import com.ctsi.ssdc.model.MenuItemBean;
import com.ctsi.ssdc.model.PageResult;

/**
 * Service Interface for managing CscpMenus.
 *
 * @author ctsi biyi generator
 *
 */
public interface CscpMenusService {

    /**
     * insert a cscpMenus.
     *
     * @param cscpMenusDTO the entity to insert
     * @return the persisted entity
     */
    CscpMenusDTO insert(CscpMenusDTO cscpMenusDTO);
    
   
    /**
     * update a cscpMenus.
     *
     * @param cscpMenusDTO the entity to update
     * @return the persisted entity
     */
    CscpMenusDTO update(CscpMenusDTO cscpMenusDTO); 

    /**
     * Get all the cscpMenuss.
     *
     * @return the list of entities
     */
    PageResult<CscpMenusDTO> findAll();

    //查找List格式
    List<CscpMenus> findAllList();

    /**
     * Get the  cscpMenus by userId.
     *
     * @param id the id of the entity
     * @return the entity
     */
    List<CscpMenusDTO> findByUserId(Integer id);

    
    /**
     * Get the  cscpMenus.
     *
     * @param id the id of the entity
     * @return the entity
     */
    CscpMenusDTO findOne(Integer id);
    
    /**
     * Delete the  cscpMenus.
     *
     * @param id the id of the entity
     */
    void delete(Integer id);
    
    
     /**
     * Get the cscpMenuss.
     *
     * @return the list of entities
     */
    PageResult<CscpMenusDTO> findByCscpMenusDTO(CscpMenusDTO cscpMenusDTO, Pageable page);

 	/**
     * Get the cscpMenuss.
     *
     * @param cscpMenusCriteria
     * @param page
     * @return
     */
	PageResult<CscpMenusDTO> findByCscpMenusCriteria(CscpMenusCriteria cscpMenusCriteria, Pageable page);

	MenuItemBean roleMenuList(Integer roleId);
	
	void saveRoleMenus(Integer roleId, String menus, String permissions);
	//获取orderbyId
    int getOrderBy(CscpMenusDTO cscpMenusDTO);

	//按照父id查找menus
    List<CscpMenus>  findByParentId(Integer parentId);
}
